package com.learn.actionplatfo.service;


import com.learn.actionplatfo.Mapper.OrderMapper;
import com.learn.actionplatfo.bean.Order;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class OrderService {

    @Autowired
    OrderMapper orderMapper;

    public List<Order> getOrderById(int orderId){
        return orderMapper.getOrderById(orderId);
    }

    public int addOrder(Order order){
        return orderMapper.addOrder(order);
    }

    public List<Order> getOrderByUpUptUserOrBuyUser(int id){
        return orderMapper.getOrderByUpUptUserOrBuyUser(id);
    }
}
